@layout("/common/_container.html"){
<style>
    ul {
        padding: 0;
        margin: 0;
    }

    .nav_ul {
        border-bottom: 5px solid #30add2;
        margin-bottom: 20px;
    }

    .nav_ul > li > a {
        color: #565656;
        border: 1px solid #dddddd;
    }

    .nav_table {
        margin-top: 10px;
    }

    .ul_flex {
        display: flex;
        padding: 0;
    }

    .ul_flex > li {
        flex: 1;
    }

    .ul_flex ul {
        padding: 0;
    }

    .ul_flex ul > li {
        line-height: 52px;
    }

    .ul_flex span {
        display: inline-block;
        width: 110px;
    }

    .home_box {
        border: 1px solid white;
        border-radius: 5px;
        overflow: hidden;
        padding-bottom: 30px;
    }

    .btnBox button {
        background: #30add1;
        color: white;
        width: 96px;
    }

    .inputOne {
        width: 65%;
        padding-left: 10px;
        border-radius: 3px;
        height: 39px;
        border: 1px solid #999999;
        margin-left: 5px;
    }

    .spanBig {
        font-weight: bold;
    }

    .project {
        display: flex;
        text-align: center;
        line-height: 40px;
    }

    .project > div {
        flex: 1;
        margin-right: 2%;
        border-radius: 5px;
        margin-bottom: 15px;
    }

    #sortPayService > li, #sortForNoDeal > li, #firstLevelProjectDiv > div, #firstLevelProjectDiv1 > div {
        border: none;
        border-top: 1px solid #d3d3d3;
        background: #f7f7f7;
    }

    .divHeader {
        background: #e8e8e8;
        border-radius: 10px;
        line-height: 45px;
        font-weight: bold;

    }

    #payServiceName > div {
        border-top: 1px solid #f7f7f7
    }

    #detailedListDiv {
        background: #f7f7f7;
        height: 300px;
        width: 98%;
        border-radius: 10px;
    }

    #department, #firstLevelProject {
        border: none;
        outline: none;
        background: #f7f7f7;
        text-align: center;
    }

    .nav-tabs > li.active > a,
    .nav-tabs > li.active > a:hover,
    .nav-tabs > li.active > a:focus {
        background: #30add2;
        border-bottom: 1px solid #30add2;
        color: white;
    }

    .demo--label {
        margin: 5px 20px 0 0;
        display: inline-block
    }

    .demo--radio {
        display: none
    }

    .demo--radioInput {
        background-color: #fff;
        border: 2px solid rgba(0, 0, 0, 0.15);
        border-radius: 100%;
        display: inline-block;
        height: 28px;
        margin-right: 10px;
        margin-top: -1px;
        vertical-align: middle;
        width: 28px;
        line-height: 1
    }

    .demo--radio:checked + .demo--radioInput:after {
        background-color: #00A1E9;
        border-radius: 100%;
        content: "";
        display: inline-block;
        height: 17px;
        margin-left: 3px;
        margin-top: 3px;
        width: 17px
    }

    .demo--checkbox.demo--radioInput, .demo--radio:checked + .demo--checkbox.demo--radioInput:after {
        border-radius: 0
    }

    .demo--radio:checked + .demo--radioInput {
        border: 2px solid #00A1E9;
    }

    .textareaBox {
        width: 100%;
        line-height: 40px;
        text-indent: 1em;
        background: #f7f7f7;
        border: none;
        border-radius: 6px;
    }

    .input_style {
        width: 50%;
        height: 39px;
        border: 1px solid #cccccc;
        border-radius: 3px;
        padding-left: 10px;
    }

    .selectBox {
        width: 190px;
        height: 39px;
    }

    .ulBoxF > li {
        float: left;
        margin-right: 30px;
    }

    .ulBoxF input, .selectBox {
        border-radius: 3px;
        border: 1px solid #a9a9a9;
    }
</style>
<div class="ibox float-e-margins ">
    <div class="ibox-content">
        <div id="isDealInfoForm">
            <div style="display: none">
                <input id="arrears" value="0">
                <input id="totleFoldingPays" value="">
                <input type="hidden" id="id" value="${consultantInfo.id}">
                <input type="hidden" id="customerId" value="${customerId}">
                <input type="hidden" id="roleName" value="">
                <input type="hidden" id="reservationsId" value="${consultantInfo.reservationsId}">
                <input type="hidden" id="medicalRecordNumber" value="${consultantInfo.medicalRecordNumber}">
                <input type="hidden" id="customerSexValue" value="${consultantInfo.customerSex}">
                <input type="hidden" id="customerNameValue" value="${consultantInfo.customerName}">
                <textarea type="hidden" id="arrearsRemarks" name="arrearsRemarks" rows=12 cols=150></textarea>
                <input type="hidden" id="customerName" value="${consultantInfo.customerName}">
                <input type="hidden" id="isLargeValue" value="${reservationsInfo.isLarge}">
                <input type="hidden" id="huifang" value="${reservationsInfo.huifang}">
                <input type="hidden" id="payservicenameValue" value="${reservationsInfo.expenditureProject}">
            </div>
            <div class="row" style="background: #f7f7f7;border: 1px solid #dddddd;border-radius: 3px;">
                <p style="margin-top: 25px;">
                    <span style="margin-left: 10px;font-size: 2em;font-weight: bolder;">${consultantInfo.customerName}</span>
                    <span style="margin-left: 2%;">${consultantInfo.customerAge}</span>
                    <span style="margin-left: 1%">
                        <select style="border: none;-webkit-appearance: none;background: #f7f7f7" id="customerSex"
                                name="customerSex">
                            <option value="1">男</option>
                            <option value="2">女</option>
                        </select>
                    </span>
                    <span style="margin-left: 4%;">电话：${consultantInfo.customerPhone}</span>
                    <span style="margin-left: 4%;">病历：${consultantInfo.medicalRecordNumber}</span>
                    <span style="margin-left: 4%;">现场TC：${consultantInfo.tcName}</span>
                </p>
            </div>
            <div class="row">
                <div class="nav_table" id="consultantInfoForm">
                    <!-- Nav tabs -->
                    <ul class="nav nav-tabs nav_ul" role="tablist" id="navBox">
                        <li role="presentation"><a href="#home" aria-controls="home" role="tab"
                                                   data-toggle="tab">患者信息</a></li>
                        <li role="presentation"><a href="#doctor" class="arrived" aria-controls="doctor" role="tab"
                                                   data-toggle="tab">开单操作</a></li>
                        <li role="presentation"><a href="#dealed" class="arrived" aria-controls="dealed" role="tab"
                                                   data-toggle="tab">开单记录</a></li>
                        <li role="presentation"><a href="#doctorNo" class="arrived" aria-controls="doctorNo" role="tab"
                                                   data-toggle="tab">看诊操作</a></li>
                        <li role="presentation" class="active onRecord"><a href="#Butt" class="arrived"
                                                                           aria-controls="Butt" role="tab"
                                                                           data-toggle="tab">回访详情</a></li>
                        <li role="presentation"><a href="#visitt" class="arrived" aria-controls="visitt" role="tab"
                                                   data-toggle="tab">就诊记录</a></li>
                        <li role="presentation"><a href="#messages" aria-controls="messages" role="tab"
                                                   data-toggle="tab">影像</a></li>
                        <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">病历</a>
                        </li>
                    </ul>
                    <!-- Tab panes -->
                    <div class="tab-content content_box" id="contentBox">

                        <div role="tabpanel" class="tab-pane arrived" id="home">
                            @layout("/tcCenter/consultant/consultant_information.html"){
                            @}
                        </div>

                        <div role="tabpanel" class="tab-pane arrived" id="doctor">
                            @layout("/tcCenter/consultant/open_bill1.html"){
                            @}
                        </div>

                        <div role="tabpanel" class="tab-pane arrived" id="dealed">
                            <div class="home_box" style="background: #f7f7f7;position: relative">
                                <div style="background: #cccccc;width: 7px;position: absolute;top: 50px;left: 3%;bottom: 0;">
                                    <span class="glyphicon glyphicon-record" style="color:#30add1;
                                    font-size: 4em;margin: -30px 0 0 -21px;"></span>
                                </div>
                                <div style="width: 45%;margin-left: 7%">
                                    <#openBillTimeList  id="openBillTimeList" list="${payServiceInfoList1}"/>
                                </div>
                            </div>
                        </div>

                        <div role="tabpanel" class="tab-pane arrived" id="doctorNo">
                            <div class="col-sm-12" style="margin-bottom: 10px;">
                                <label class="demo--label">
                                    <input class="demo--radio" type="radio" value="成交" name="radio" id="revisit"
                                           checked="checked">
                                    <span class="demo--radioInput"></span>成交
                                </label>
                                <label class="demo--label">
                                    <input class="demo--radio" type="radio" name="radio" id="noRevisit" value="不成交">
                                    <span class="demo--radioInput"></span>不成交
                                </label>
                            </div>
                            <div id="url1">
                                @layout("/tcCenter/consultant/consultantNoOne.html"){
                                @}
                            </div>
                            <div id="url2" style="display: none">
                                @layout("/tcCenter/consultant/open_bill2.html"){
                                @}
                            </div>
                        </div>

                        <div role="tabpanel" class="tab-pane active onRecord" id="Butt">
                            <div class="col-sm-12">
                                <h3 style="text-indent: 1em;">回访详情</h3>
                                <div id="further" style="background:#f7f7f7;border-radius: 10px;padding: 20px;"></div>
                            </div>
                            <div class="col-sm-12">
                                <h3>添加回访详情</h3>
                                <textarea name="revisitContent" id="revisitContent" class="textareaBox"
                                          style="height: 200px;"></textarea>
                            </div>
                            <div class="col-sm-12">
                                <ul class="ul_flex clearfix" style="padding: 20px 0 0 20px;">
                                    <li>
                                        <p>
                                            <span>预约回访人</span>
                                            <input type="text" id="reservations" class="input_style"
                                                   value="${reservations}">
                                        </p>
                                        <p>
                                            <span>预约回访时间</span>
                                            <input type="text" id="appointmentTime2" class="input_style"
                                                   onclick="laydate({istiem:true,format:'YYYY-MM-DD'})">
                                        </p>
                                    </li>
                                    <li>
                                        <p>
                                            <span>跟踪状态</span>
                                            <select id="followStatus" name="followStatus" class="input_style">
                                                <option value="">请选择</option>
                                                <option value="跟踪中">跟踪中</option>
                                                <option value="跟踪完成">跟踪完成</option>
                                                <option value="跟踪结束">跟踪结束</option>
                                            </select>
                                        </p>
                                        <p>
                                            <span>消费状态</span>
                                            <select id="consumptionStatus" name="consumptionStatus" class="input_style">
                                                <option value="">请选择</option>
                                                <option value="未消费">未消费</option>
                                                <option value="只交定金">只交定金</option>
                                                <option value="未完成">未完成</option>
                                                <option value="完成">完成</option>
                                            </select>
                                        </p>
                                    </li>
                                    <li>
                                        <p>
                                            <span>下次回访时间</span>
                                            <input type="text" class="input_style" readonly="readonly"
                                                   value="${customerInfo.appointmentTime}">
                                        </p>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-sm-12">
                                <div class="btnBox">
                                    <div style="float: right;margin:20px 2% 0 0;">
                                        <button type="button" class="btn" onclick="ConsultantInfoDlg.addIsRevisit2()">
                                            确定
                                        </button>
                                        <button type="button" style="background:#da6792;" id="cancel" class="btn"
                                                onclick="IsDealInfoDlg.close()">取消
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div role="tabpanel" class="tab-pane arrived" id="visitt">
                            <div class="home_box" style="background: #f7f7f7;position: relative">
                                <div style="background: #cccccc;width: 7px;position: absolute;top: 50px;left: 3%;bottom: 0;">
                                    <span class="glyphicon glyphicon-record" style="color:#30add1;
                                    font-size: 4em;margin: -30px 0 0 -21px;"></span>
                                </div>
                                <div style="width: 54%;margin-left: 7%">
                                    <#sortVisitDetail  id="sortVisitDetail" list="${customerInfoList}"/>
                                </div>
                            </div>
                        </div>
                        <div role="tabpanel" class="tab-pane arrived" id="messages">
                            @layout("/doctorLooked/upload_icon.html"){
                            @}
                        </div>
                        <div role="tabpanel" class="tab-pane" id="profile">
                            @layout("/doctorLooked/caseInfoPages.html"){
                            @}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/tcCenter/consultant/is_deal_info.js"></script>
<script src="${ctxPath}/static/modular/tcCenter/consultant/consultant_infos.js"></script>
<script>
    $("#consumptionStatus").val("${consultantInfo.consumptionStatus}");
    $("#followStatus").val("${consultantInfo.followStatus}");
    $("#consumptionStatuss").val("${consultantInfo.consumptionStatus}");
    $("#followStatuss").val("${consultantInfo.followStatus}");
    $("#expenditureProject").val("${reservationsInfo.expenditureProject}");
    var customerId = document.getElementById("customerId").value;
    $("ul#sortForNoDeal").on("click", "li", function () {
        var department = $(this).text();
        var dc = department + "," + customerId;
        document.getElementById("department").value = department;
        $.ajax({
            url: Feng.ctxPath + "/payService/getFirstLevelProject",
            type: "post",
            data: {
                "dc": dc
            },
            success: function (data) {
                var txt = '';
                for (var i = 0; i < data.length; i++) {
                    txt += ' <div style="display: inline-block;width:100%" onclick="getPayServiceId(\'' + data[i].firstLevelProject + '\')"> ' +
                        ' &nbsp' + data[i].firstLevelProject + ' </div>';
                    var customerId = data[i].customerId;
                    var department = data[i].department;
                    getPayServiceId = function (firstLevelProject) {
                        var df = department + "," + firstLevelProject;
                        $.ajax({
                            url: Feng.ctxPath + "/payService/getPayServiceId",
                            type: "post",
                            data: {
                                "df": df
                            },
                            success: function (data1) {
                                document.getElementById("department").value = data1.department;
                                document.getElementById("firstLevelProject").value = data1.firstLevelProject;
                                document.getElementById("payServiceId").value = data1.id;
                            },
                            error: function (data) {
                                alert('内部故障!');
                            }
                        });
                    };
                }
                document.getElementById('firstLevelProjectDiv1').innerHTML = txt;
            },
            error: function (data) {
                alert('内部故障!');
            }
        });
    })
    $("ul#sortPayService,ul#sortForNoDeal").on("click", "li", function () {
        $("#sortPayService>li").css({"background": "#f7f7f7", "border-color": "#d3d3d3;", "color": "#4f4f4f"});
        $("#sortForNoDeal>li").css({"background": "#f7f7f7", "border-color": "#d3d3d3;", "color": "#4f4f4f"});
        $(this).css({"background": "#31add1", "border-color": "#f7f7f7;", "color": "white"});
        var department = $(this).text();
        var dc = department + "," + customerId;
        $.ajax({
            url: Feng.ctxPath + "/payService/getFirstLevelProject",
            type: "post",
            data: {
                "dc": dc
            },
            success: function (data) {
                var txt = '';
                for (var i = 0; i < data.length; i++) {
                    txt += ' <div style="display: inline-block;width: 100%" onclick="openFirstLevelProject(\'' + data[i].firstLevelProject + '\')"> ' +
                        ' &nbsp' + data[i].firstLevelProject + '</div>';
                    var customerId = data[i].customerId;
                    var department = data[i].department;
                    openFirstLevelProject = function (firstLevelProject) {
                        var cdf = customerId + "," + department + "," + firstLevelProject;
                        var txts = '';
                        $.ajax({
                            url: Feng.ctxPath + "/payService/getPaySeriveName",
                            type: "post",
                            data: {
                                "cdf": cdf
                            },
                            success: function (data1) {
                                for (var i = 0; i < data1.length; i++) {
                                    txts += ' <div style="display: inline-block;width: 400px"> ' +
                                        ' <a href=\"javascript:;\" onclick=\"openDetails(\'' + data1[i].id + '\')\">&nbsp' + data1[i].payServiceName + '&nbsp' + data1[i].payServicePriceOne + '-' + data1[i].payServicePriceTwo + '元</a> ' +
                                        ' </div>';
                                }
                                document.getElementById('payServiceName').innerHTML = txts;
                            },
                            error: function (data) {
                                alert('内部故障!');
                            }
                        });
                    };
                }
                document.getElementById('firstLevelProjectDiv').innerHTML = txt;
            },
            error: function (data) {
                alert('内部故障!');
            }
        });
    })
    $("div#firstLevelProjectDiv,div#firstLevelProjectDiv1").on('click', 'div', function () {
        $("#firstLevelProjectDiv>div").css({"background": "#f7f7f7", "border-color": "#d3d3d3;", "color": "#4f4f4f"});
        $("#firstLevelProjectDiv1>div").css({"background": "#f7f7f7", "border-color": "#d3d3d3;", "color": "#4f4f4f"});
        $(this).css({"background": "#31add1", "border-color": "#f7f7f7;", "color": "white"});
    });
    var arr = $("#huifang").val();
    var strs = arr.split(",");
    var str1 = '';
    $(function () {
        for (var i = 0; i < strs.length; i++) {
            str1 = "<p>" + strs[i] + "</p>";
            if (strs[i] != "") {
                $("#further").append(str1)
            }
        }
    });


    deletePayServices = function (id) {
        $.ajax({
            url: Feng.ctxPath + "/payService/deleteOpenBill",
            type: "post",
            data: {
                "id": id
            },
            success: function (data) {
                var txt = '<div id="totleBox" style="padding-bottom: 10px;overflow: hidden;height: 220px;overflow-y: scroll;">';
                var totleReceivable = 0.00;
                var totleFoldingPay = 0.00;
                var customerId = document.getElementById("customerId").value;
                if (data.length == 0) {
                    document.getElementById('detailedListDiv').innerHTML = txt;
                    document.getElementById('totleFoldingPays').value = totleFoldingPay;
                } else {
                    for (var i = 0; i < data.length; i++) {
                        var pnum = data[i].payServiceNum;
                        var psptwo = data[i].payServicePriceTwo;
                        var foldingPay = data[i].foldingPay;
                        totleReceivable += pnum * psptwo.toFixed(2);
                        totleFoldingPay += foldingPay;
                        txt += ' <div class="data_row" style="margin-top: 5px">' +
                            '                <div style=\"padding-left: 10px;width: 120px;display: inline-block;position: relative;top: 11px;\">\n' +
                            '                    <div style=\"border-bottom: 1px solid;\">\n' +
                            '                        <div style=\"font-size: 12px;display: inline-block;width:55px;border-right: 1px solid black;text-align: right;height: 22px;margin-bottom: -5px;\" id=\"yw_left_top\">' + data[i].leftUp + '</div><!--\n' +
                            '                         --><div style=\"font-size: 12px;display: inline-block;width:55px;\" id=\"yw_right_top\">' + data[i].rightUp + '</div>\n' +
                            '                   </div>\n' +
                            '                    <div>\n' +
                            '                        <div style=\"font-size: 12px;display: inline-block;width:55px;border-right: 1px solid black;text-align: right;height: 22px;margin-bottom: -5px;\" id=\"yw_left_bottom\">' + data[i].leftDown + '</div><!--\n' +
                            '                         --><div style=\"font-size: 12px;display: inline-block;width:55px;\" id=\"yw_right_top\">' + data[i].rightDown + '</div>\n' +
                            '                   </div>\n' +
                            '                </div>\n' +
                            '<span style="display: inline-block;width: 4% ">' + data[i].department + '</span>' +
                            '<span style="display: inline-block;width: 5% ">' + data[i].firstLevelProject + '</span>' +
                            '<span style="display: inline-block;width: 21%">' + data[i].payServiceName + '</span>' +
                            '<span style="display: inline-block;width: 6% ">' + data[i].payService + '元/' + data[i].unit + '</span>' +
                            '<span style="display: inline-block;width: 3% ">' + data[i].payServiceNum + data[i].unit + '</span>' +
                            '<span style="display: inline-block;width: 7% ">医生：' + data[i].doctor + '</span>' +
                            '<span style="display: inline-block;width: 10%">医助/护士：' + data[i].nurse + '</span>' +
                            '<span style="display: inline-block;width: 3% "><a href="javascript:;" style="color: #2fd255" onclick="openPayService(' + data[i].id + ')">修改</a></span>' +
                            '<span style="display: inline-block;width: 3% "><a href="javascript:;" style="color: #db6693" onclick="deletePayServices(' + data[i].id + ')">删除</a></span>' +
                            '<span style="display: inline-block;width: 12%">折后价：<span id="zhe_' + data[i].id + '" class="totalzhe" style="color: #2eadd0;font-size: 2em;font-weight: bold;">' + foldingPay.toFixed(2) + '</span>元</span>' +
                            '<span style="display: inline-block;width: 7% "><a href="javascript:;" style="color: #31d115" onclick="openUpdateMoney1(' + data[i].id + ')">修改折后价</a></span>' +
                            '<span style="display: inline-block;width: 4% ">实收：</span><input class="serviceId" type="hidden" value="' + data[i].payServiceId + '"/><input class="serviceIds" type="hidden" value="' + data[i].id + '"/><input type="text" class="totleinput" style="border: 1px solid black;width: 115px;border-radius: 5px;padding-left: 5px;" value="' + foldingPay.toFixed(2) + '" oninput="inputNum()"/>' +
                            '</div>';
                    }
                    txt += '</div>';
                    txt += '<div><div style="position: absolute;right: 3%;bottom: 2%;"><p>折后金额：<span style="font-weight: bold;font-size: 22px;">' + totleFoldingPay.toFixed(2) + '</span>元 ' + //' <a href="javascript:;" style="color: #31d115;" onclick="openUpdateMoney(\'' + customerId + '\')">&nbsp修改折后价</a></p>' +
                        '<p id="arrearsOfMoney">实收金额：<input id="serviceActualPay" style="color: #30acd0;font-weight: bold;font-size: 22px;border: none;background: #f7f7f7;width:100px;" readonly="readonly" value="' + totleFoldingPay.toFixed(2) + '"/>元 </p></div></div> ';

                    document.getElementById('detailedListDiv').innerHTML = txt;
                    document.getElementById('totleFoldingPays').value = totleFoldingPay;
                }
                Feng.success("删除成功!");
            },
            error: function (data) {
                alert('内部故障!');
            }
        });
    }

    inputNum = function () {
        var input = document.getElementsByClassName('totleinput');
        var inputNum = 0;
        for (var i = 0; i < input.length; i++) {
            inputNum += parseFloat(input[i].value)
        }
        $("#serviceActualPay").attr("value", inputNum)
    }

    //退款
    refundMoney = function (customerId, reservationsId, operationTime) {
        var parpams = customerId + "," + reservationsId + "," + operationTime;
        var index = layer.open({
            type: 2,
            title: '退款',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/consultant/refundMoney/' + parpams
        });
        this.layerIndex = index;
    };

    //补欠款
    payQianKuan = function (customerId, reservationsId, operationTime) {
        var ids = customerId + "," + reservationsId + "," + operationTime;
        var index = layer.open({
            type: 2,
            title: '补欠款',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/consultant/payKuans/' + ids
        });
        this.layerIndex = index;
    };

    openPayService = function (id) {
        var customerId = document.getElementById("customerId").value;
        var ci = customerId + "," + id;
        var index = layer.open({
            type: 2,
            title: '修改收费详情',
            area: ['60%', '95%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/payService/getPayServiceDetail/' + ci
        });
        this.layerIndex = index;
    };

    openUpdateMoney = function (customerId) {
        var index = layer.open({
            type: 2,
            title: '修改总项目金额',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/payService/openUpdateMoney/' + customerId
        });
        this.layerIndex = index;
    };

    openUpdateMoney1 = function (id) {
        var zheMoney = document.getElementById("zhe_" + id).innerText;
        var params = id + "," + zheMoney;
        var index = layer.open({
            type: 2,
            title: '&nbsp;',
            area: ['40%', '50%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/payService/openUpdateMoney1/' + params
        });
        this.layerIndex = index;
    };

    openDetails = function (id) {
        var index = layer.open({
            type: 2,
            title: '收费项目详情',
            area: ['60%', '95%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/payService/getPayServiceDetails/' + id
        });
        this.layerIndex = index;
    };

    //补单
    supplement = function () {
        var index = layer.open({
            type: 2,
            title: '补单',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/payService/to_supplement'
        });
        this.layerIndex = index;
    };

    //作废
    toVoid = function (customerId, reservationsId, operationTime) {
        var ids = customerId + "," + reservationsId + "," + operationTime;
        var index = layer.open({
            type: 2,
            title: '作废',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/consultant/to_toVoid/' + ids
        });
        this.layerIndex = index;
    };

    //打印确认单
    singlePrint = function (customerId, reservationsId, operationTime) {
        var ids = customerId + "," + reservationsId + "," + operationTime;
        var index = layer.open({
            type: 2,
            title: '开单打印',
            area: ['60%', '100%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/consultant/singlePrintt/' + ids,
            success: function () {
                window.parent.Consultant.table.refresh();
            }
        });
        this.layerIndex = index;
    };


    //修改项目
    updateDeal = function (customerId, reservationsId, operationTime) {
        var ids = customerId + "," + reservationsId + "," + operationTime;
        var index = layer.open({
            type: 2,
            title: '修改项目',
            area: ['100%', '100%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/consultant/updateDeal/' + ids,
            success: function () {
                window.parent.Consultant.table.refresh();
            }
        });
        this.layerIndex = index;
    };


    //医生修改
    modify_ys = function (customerId, id2, reservationsId, operationTime) {
        var cir = customerId + "," + id2 + "," + reservationsId + "," + operationTime;
        var index = layer.open({
            type: 2,
            title: '修改',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/payService/modifying_data/' + cir
        });
        this.layerIndex = index;
    };

    //就诊记录 修改
    appointment = function (customerId, reservationsId, doctor) {
        var cid = customerId + "," + reservationsId + "," + doctor;
        console.log(cid);
        var index = layer.open({
            type: 2,
            title: '新建预约',
            area: ['60%', '100%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/doctorLooked/doctor_update_appointment/' + cid
        });
        this.layerIndex = index;
    };


</script>
@}
